package com.sls.web.manager.game.pojo.ekhui;

import java.io.Serializable;
import java.util.Date;

import com.sls.core.common.MD5Util;

/**
 * 操作员
 * @author Administrator
 *
 */
public class Operator implements Serializable {
	private static final long serialVersionUID = -1524360704524856673L;
	private String operatorId ;			//操作员id
	private String traderId ;			//操作员所属商户
	private String traderName ;			//操作员所属商户名称
	private String operatorNo ;			//商户操作员编号
	private String operatorName ;		//操作员姓名
	private String operatorPassword ;	//操作员密码
	private Date lastLoginTime ;		//操作员最后登录时间
	private String operatorStatus ;		//1-正常 2-暂停 3-注销
	private Date lastModifyTime ;		//最后更新时间
	private Date createTime ;			//创建时间
	private String qq ;					//联系qq
	private String email ;				//联系email
	private String remark ;
	public Operator(){
		super() ;
	}
	public String getOperatorId() {
		return operatorId;
	}
	public void setOperatorId(String operatorId) {
		this.operatorId = operatorId;
	}
	public String getTraderId() {
		return traderId;
	}
	public void setTraderId(String traderId) {
		this.traderId = traderId;
	}
	public String getOperatorNo() {
		return operatorNo;
	}
	public void setOperatorNo(String operatorNo) {
		this.operatorNo = operatorNo;
	}
	public String getOperatorName() {
		return operatorName;
	}
	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}
	public String getOperatorPassword() {
		return operatorPassword;
	}
	public void setOperatorPassword(String operatorPassword) {
		this.operatorPassword = operatorPassword;
	}
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	public String getOperatorStatus() {
		return operatorStatus;
	}
	public void setOperatorStatus(String operatorStatus) {
		this.operatorStatus = operatorStatus;
	}
	public String getQq() {
		return qq;
	}
	public void setQq(String qq) {
		this.qq = qq;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Date getLastModifyTime() {
		return lastModifyTime;
	}
	public void setLastModifyTime(Date lastModifyTime) {
		this.lastModifyTime = lastModifyTime;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getTraderName() {
		return traderName;
	}
	public void setTraderName(String traderName) {
		this.traderName = traderName;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Operator saveOperator(Trader trader){
		this.setTraderId(trader.getTraderId()) ;
		this.setTraderName(trader.getTraderName()) ;
		this.setOperatorStatus("1") ;
		String password = MD5Util.MD5Encode(MD5Util.MD5Encode(this.getOperatorId() + this.getOperatorPassword())).toLowerCase() ;
		this.setOperatorPassword(password) ;
		this.setCreateTime(new Date()) ;
		return this ;
	}
}
